<?php

use Illuminate\Database\Seeder;

class UsersTableSeeder extends Seeder
{

    /**
     * Auto generated seed file
     *
     * @return void
     */
    public function run()
    {
        $response = Event::until(new someEvent());
        if ($response === false) {
            throw new Exception("Prerun event failed, seed wasn't executed!");
        }

        \DB::table('users')->delete();
        $user=new \App\User();
        $user->name='admin';
        $user->email='admin@admin.com';
        $user->password=bcrypt('123456');
        $user->save();

    }
}